const path = require("path")
function reslove(dir) {
    return path.join(__dirname, dir)
}

module.exports = {
    //关闭eslint
    lintOnSave: false,
    //写原生的webpack配置
    configureWebpack: {
        resolve: {
            alias: {
                api: reslove("src/api"),
                components: reslove("src/components"),
                mock: reslove("src/mock"),
                pages: reslove("src/pages"),
                router: reslove("src/router"),
                routes: reslove("src/routes"),
                store: reslove("src/store"),
                util: reslove("src/util")
            }
        }
    },
    //跨域配置
    devServer: {
        proxy: {
            '/sph': {
                target: 'http://39.98.123.211',
                pathRewrite: { '^/sph': '' }
            }
        }
    }
}